
<%@ page import="aca.Turma"%>
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: 'turma.label', default: 'Turma')}" />
<title><g:message code="default.show.label" args="[entityName]" /></title>
<g:javascript library="application" />
<modalbox:modalIncludes />
</head>
<body>
	<a href="#show-turma" class="skip" tabindex="-1"><g:message
			code="default.link.skip.label" default="Skip to content&hellip;" /></a>
	<div class="nav" role="navigation">
		<ul>
			<li><a class="home" href="${createLink(uri: '/user/index')}"><g:message
						code="default.home.label" /></a></li>
			<li><g:link class="list" action="list_aluno">
					<g:message code="default.list.label" args="[entityName]" />
				</g:link></li>
		</ul>
	</div>
	<div id="show-turma" class="content scaffold-show" role="main">
		<h1>
			<g:message code="default.show.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message" role="status">
				${flash.message}
			</div>
		</g:if>
		<ol class="property-list turma">

			<g:if test="${turmaInstance?.nome}">
				<li class="fieldcontain"><span id="nome-label"
					class="property-label"><g:message code="turma.nome.label"
							default="Nome" /></span> <span class="property-value"
					aria-labelledby="nome-label"><g:fieldValue
							bean="${turmaInstance}" field="nome" /></span></li>
			</g:if>

			<g:if test="${turmaInstance?.professor}">
				<li class="fieldcontain"><span id="professor-label"
					class="property-label"><g:message
							code="turma.professor.label" default="Professor" /></span> <span
					class="property-value" aria-labelledby="professor-label"><g:link
							controller="professor" action="show"
							id="${turmaInstance?.professor?.id}">
							${turmaInstance?.professor?.encodeAsHTML()}
						</g:link></span></li>
			</g:if>

			<g:if test="${turmaInstance?.disciplina}">
				<li class="fieldcontain"><span id="disciplina-label"
					class="property-label"><g:message
							code="turma.disciplina.label" default="Disciplina" /></span> <span
					class="property-value" aria-labelledby="disciplina-label"><g:fieldValue
							bean="${turmaInstance}" field="disciplina" /></span></li>
			</g:if>

			<g:if test="${turmaInstance?.periodo}">
				<li class="fieldcontain"><span id="periodo-label"
					class="property-label"><g:message code="turma.periodo.label"
							default="Periodo" /></span> <span class="property-value"
					aria-labelledby="periodo-label"><g:fieldValue
							bean="${turmaInstance}" field="periodo" /></span></li>
			</g:if>

			<g:if test="${turmaInstance?.alunos}">
				<li class="fieldcontain"><span id="alunos-label"
					class="property-label"><g:message code="turma.alunos.label"
							default="Alunos" /></span> <g:each in="${turmaInstance.alunos}" var="a">
						<span class="property-value" aria-labelledby="alunos-label"><g:link
								controller="aluno" action="show" id="${a.id}">
								${a?.encodeAsHTML()}
							</g:link></span>
					</g:each></li>
			</g:if>
			<g:if test="${turmaInstance.alunos.contains(alunoInstance)}">
			<g:if test="${turmaInstance?.atividades}">
				<li class="fieldcontain"><span id="atividades-label"
					class="property-label"><g:message
							code="turma.atividades.label" default="Atividades" /></span> <g:each
						in="${turmaInstance.atividades}" var="a">
						<span class="property-value" aria-labelledby="atividades-label"><g:link
								controller="atividade" action="show_aluno" id="${a.id}">
								${a?.encodeAsHTML()}
							</g:link></span>
					</g:each></li>
			</g:if>
			</g:if>

			<g:if test="${turmaInstance?.monitores}">
				<li class="fieldcontain"><span id="monitores-label"
					class="property-label"><g:message
							code="turma.monitores.label" default="Monitores" /></span> <g:each
						in="${turmaInstance.monitores}" var="m">
						<span class="property-value" aria-labelledby="monitores-label"><g:link
								controller="monitor" action="show" id="${m.id}">
								${m?.encodeAsHTML()}
							</g:link></span>
					</g:each></li>
			</g:if>

		</ol>
		<g:form>
		<g:if test="${!turmaInstance.alunos.contains(alunoInstance)}">
			<fieldset class="buttons">
				<modalbox:createLink controller="turma" action="request"
					id="${turmaInstance?.id}" title="Solicitação" width="500">
					<g:message code="default.button.request.label"
						default="Solicitar participação como aluno" />
				</modalbox:createLink>
			</fieldset>
		</g:if>
		</g:form>
	</div>
</body>
</html>
